//
//  ProductDetialCellTableViewCell.m
//  ForestPack
//
//  Created by 骆锴 on 2018/8/7.
//  Copyright © 2018年 郑洲. All rights reserved.
//

#import "ProductDetialCell.h"

@interface ProductDetialCell ()

@property (nonatomic,strong) UILabel *title;
@property (nonatomic,strong) UILabel *value;

@end

@implementation ProductDetialCell

+ (ProductDetialCell *)cellWithTableView:(UITableView *)tableView andIndexPath:(NSIndexPath *)indexPath{
    static NSString *cellID = @"ProductDetialCell";
    ProductDetialCell *cell = [tableView dequeueReusableCellWithIdentifier:cellID];
    if (cell == nil) {
        cell = [[ProductDetialCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellID];
        cell.backgroundColor = [UIColor whiteColor];
        [cell createSubView];
    }
    
    return cell;
}

-(void)createSubView{
    _title =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(15), ScreenX375(80), ScreenX375(14))];
    _title.text = @"印刷方式 :";
    _title.font = Kfont(14);
    _title.textColor = REXADECIMALCOLOR(@"#333333");
    _title.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_title];
    
    _value =[[UILabel alloc] initWithFrame:CGRectMake(ScreenX375(87), ScreenX375(15), ScreenX375(250), ScreenX375(14))];
    _value.text = @"水印";
    _value.font = Kfont(14);
    _value.textColor = REXADECIMALCOLOR(@"#999999");
    _value.textAlignment = NSTextAlignmentLeft;
    [self addSubview:_value];
    
    UIImageView *line = [[UIImageView alloc] initWithFrame:CGRectMake(ScreenX375(13), ScreenX375(43), SCREEN_WIDTH - ScreenX375(26), ScreenX375(1))];
    line.image = [UIImage imageNamed:@"虚线"];
    [self addSubview:line];
}

-(void)initTitle:(NSString *)titleText{
    self.title.text = titleText;
}

-(void)initValue:(NSString *)valueText{
    self.value.text = valueText;
}
@end
